cmake_minimum_required(VERSION 3.5)

# Set the project name
project (02-detect)

# find required opencv
find_package(OpenCV REQUIRED)
# directory of opencv headers
include_directories(${OpenCV_INCLUDE_DIRS})
# directory of opencv library
link_directories(${OpenCV_LIBRARY_DIRS})


# onnxruntime
set(ONNXRUNTIME_ROOT_PATH /media/chyang/data/third_party/linux/onnxruntime/onnxruntime-linux-x64-gpu-1.17.3/)
set(ONNXRUNTIME_INCLUDE_DIRS ${ONNXRUNTIME_ROOT_PATH}/include/)
set(ONNXRUNTIME_LIB ${ONNXRUNTIME_ROOT_PATH}lib/libonnxruntime.so)
include_directories(${ONNXRUNTIME_INCLUDE_DIRS})

# name of executable file and path of source file
add_executable(face_landmark_demo src/face_landmark_demo.cpp)
target_link_libraries(face_landmark_demo ${OpenCV_LIBS} ${ONNXRUNTIME_LIB})

add_executable(faster_rcnn src/faster_rcnn.cpp)
target_link_libraries(faster_rcnn ${OpenCV_LIBS} ${ONNXRUNTIME_LIB})

add_executable(mask_rcnn_demo src/mask_rcnn_demo.cpp)
target_link_libraries(mask_rcnn_demo ${OpenCV_LIBS} ${ONNXRUNTIME_LIB})